<template>
  <PageListContainer>
    <BreadCrumb>
      <template #default>
        <el-breadcrumb separator="/">
          <el-breadcrumb-item>考古加讲师数据</el-breadcrumb-item>
          <el-breadcrumb-item :to="{ name: 'AgencyKgjLecturerLecturerList' }">讲师发放管理</el-breadcrumb-item>
          <el-breadcrumb-item>推广列表</el-breadcrumb-item>
        </el-breadcrumb>
      </template>
    </BreadCrumb>
    <div class="base-block">
      <div class="info-box">
        <div class="link_count">
          推广用户数：<span class="value">{{ state.pages.total }}</span>
        </div>
      </div>
    </div>
    <div class="base-block">

      <KTable v-loading="state.loading" v-bind="tableState" v-on="tableEvent">
      </KTable>
    </div>
  </PageListContainer>
</template>

<script setup lang="ts">
import { useRoute } from 'vue-router';
import { useTableList } from './hooks/use-table';
import BreadCrumb from '@/components/base-bread-crumb/index.vue';
defineOptions({ name: 'AgencyKgjLecturerPromotionList' });
const route = useRoute();
const agent_id = route.params.agent_id;
const { state, tableState, tableEvent } = useTableList({
  getParams: (params: Record<string, any>) => {
    return {
      ...params,
      agent_id
    };
  }
});
</script>
<style lang="scss" scoped>
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;

  &.disable {
    color: #86909c;
  }
}

.info-box {
  display: flex;

  .value {
    font-size: 16px;
    font-weight: bold;
  }

  .link_count {
    min-width: 120px;
    margin-right: 10px;
  }
}

</style>
